import { createBrowserRouter } from "react-router-dom";
import Layout from "../pages/layout";
import Login from "../pages/login";
import AuthRoute from "../components/AuthRoute";
import Home from "../pages/Home";
import Article from "../pages/Article";
import Publish from "../pages/Publish";
import Bmapgl from "../pages/Bmapgl";

const router = createBrowserRouter([
  {
    path: "/",
    element: <AuthRoute><Layout /></AuthRoute>,
    children: [
      {
        // path: 'home',
        index: true,
        element: <Home />
      },
      {
        path: 'article',
        element: <Article />
      },
      {
        path: 'publish',
        element: <Publish />
      },
      {
        path: 'bmap',
        element: <Bmapgl />
      }
    ]
  },
  {
    path: "/login",
    element: <Login />,
  },
]);
export default router;
